package chen.dev.learn.service.impl;

import chen.dev.learn.service.KtvService;
import org.springframework.stereotype.Service;

import java.util.Random;
import java.util.concurrent.TimeUnit;

/**
 * Ktv服务实现类A
 *
 * @author chensj
 * @date 2020-04-20 20:58
 */
@Service
public class KtvPrincessA implements KtvService {

    private Random random = new Random();
    private int bound = 5;

    @Override
    public void momoSing(String customer) {

        try {
            TimeUnit.SECONDS.sleep(random.nextInt(bound));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("享受完momoSing服务");
    }
}
